<!DOCTYPE html>

<html xmlns:th="http://www.thymeleaf.org"
	xmlns:dt="http://github.com/dandelion/datatables"
	xmlns:sec="http://www.thymeleaf.org">
<head>
<meta charset="utf-8" />
<title th:utext="#{title.viewusecase}"></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="" />
<meta name="author" content="Dhrubo" />

<!-- Le styles -->
<link rel="stylesheet" type="text/css" media="all"
	href="css/bootstrap.css" th:href="@{/resources/css/bootstrap.css}" />
<style type="text/css">
body {
	padding-top: 60px;
	padding-bottom: 40px;
}

.sidebar-nav {
	padding: 9px 0;
}

@media ( max-width : 980px) {
	/* Enable use of floated navbar text */
	.navbar-text.pull-right {
		float: none;
		padding-left: 5px;
		padding-right: 5px;
	}
}
</style>
<link rel="stylesheet" type="text/css" media="all"
	href="css/bootstrap-responsive.css"
	th:href="@{/resources/css/bootstrap-responsive.css}" />
<link href="css/tablecloth.css"
	th:href="@{/resources/css/tablecloth.css}" rel="stylesheet" />

<link href="css/bootstrap-editable.css" rel="stylesheet"
	th:href="@{/resources/css/bootstrap-editable.css}" />
<link rel="stylesheet" type="text/css" media="all"
	href="css/jquery.dataTables.css"
	th:href="@{/resources/css/jquery.dataTables.css}" />
<link type="text/css" rel="stylesheet" href="css/jquery.tocify.css"
	th:href="@{/resources/css/jquery.tocify.css}" />

<script src="js/jquery.js" th:src="@{/resources/js/jquery.js}"></script>
<script src="js/jquery.dataTables.js"
	th:src="@{/resources/js/jquery.dataTables.js}"></script>



</head>

<body>

	<div th:substituteby="fragments/userheader :: navbar"> </div>
	<div class="container-fluid">

		<div class="row-fluid">
			<div class="span6">
				<ul class="breadcrumb">
					<li><a href="home">Home</a> <span class="divider">/</span></li>
					<li><a href="listusecases">List Use Cases</a> <span
						class="divider">/</span></li>
					<li class="active" th:text="'View Use Case : ' + ${useCase.name}"></li>
				</ul>
			</div>
			<div class="span6">
				<div class="btn-group pull-right">
					
					<a th:href="@{/editusecase(usecase=${useCase.id})}" class="btn btn-warning" type="button">Edit</a>
					<a th:href="@{/listusecases}" class="btn btn-success" type="button">List Use Cases</a>
					
					<!-- 
					<button class="btn btn-success" type="button">Request
						Review</button>
					
					<a href="details.html"
						th:href="@{/editusecase(usecase=${useCase.id})}"
						class="btn btn-warning">Edit</a> 
						
					<button class="btn btn-danger" type="button">Delete</button>	
					<a class="btn dropdown-toggle"
						data-toggle="dropdown" href="#"> Export <span class="caret"></span>
					</a>
					<ul class="dropdown-menu">
						<li><a href="#">As Microsoft Word</a></li>
						<li><a href="#">As Adobe PDF</a></li>
						<li><a href="#">As LibreOffice Writer</a></li>
					</ul>
					 -->
				</div>
			</div>
		</div>

		<div class="row-fluid">



			<div class="span9">

				<h1>Use Case Identification</h1>

				<table class="table">
					<tr>
						<td><strong>Use Case #</strong></td>
						<td th:text="${useCase.id}"></td>

					</tr>
					
					<tr>
						<td><strong>Name</strong></td>
						<td th:text="${useCase.name}"></td>

					</tr>

					
					<tr>
						<td><strong>Project</strong></td>
						<td th:text="${useCase.project.name}"></td>

					</tr>

					<tr>
						<td><strong>Company</strong></td>
						<td th:text="${useCase.company.name}"></td>

					</tr>



				</table>
				
				<h2>History</h2>
				
				
				<table class="table">
					

					<tr>
						<td><strong>Created By</strong></td>
						<td th:text="${useCase.createdBy.name}"></td>

					</tr>

					<tr>
						<td><strong>Created Date</strong></td>
						<td th:text="${useCase.createdDate}"></td>

					</tr>

					<tr>
						<td><strong>Last Updated Date</strong></td>
						<td th:text="${useCase.lastUpdatedBy.name}"></td>

					</tr>

					<tr>
						<td><strong>Last Updated By</strong></td>
						<td th:text="${useCase.lastUpdatedDate}"></td>

					</tr>
					



				</table>
				
				<h1>Use Case Definition</h1>
				
				<h2>Description</h2>
				<div th:text="${useCase.description}"></div>
				
				
				
				<h2>Actors</h2>

				<table class="condition">
					<thead>
						<tr>
							<th style="width: 5%">Sl#</th>

							<th>Actor</th>

							<th>Complexity</th>

						</tr>
					</thead>
					<tbody>


						<tr th:each="s, row : ${useCase.actors}">
							<td style="width: 5%" th:text="${row.count}">1</td>
							<td th:text="${s.name}"></td>

							<td th:text="${s.name}"></td>
						</tr>

					</tbody>
				</table>
				
				
				
				<h2>Pre-conditions</h2>
				
				<table class="condition">
					<thead>


						<tr>
							<th style="width: 5%">Sl#</th>

							<th>Description</th>

							

						</tr>
					</thead>
					<tbody>


						<tr th:each="s, row : ${useCase.preConditions}">
							<td style="width: 5%" th:text="${row.count}">1</td>
							<td th:text="${s}"></td>

						</tr>

					</tbody>
				</table>
				
				<h2>Post-conditions</h2>
				
				<table class="condition">
					<thead>


						<tr>
							<th style="width: 5%">Sl#</th>

							<th>Description</th>

							

						</tr>
					</thead>
					<tbody>


						<tr th:each="s, row : ${useCase.postConditions}">
							<td style="width: 5%" th:text="${row.count}">1</td>
							<td th:text="${s}"></td>

						</tr>

					</tbody>
				</table>

				<h2>Priority</h2>
				<div th:text="${useCase.priority}"></div>
				
				<h2>Frequency of Use</h2>
				<div th:text="${useCase.description}"></div>


				<h1>Main Flow</h1>


				<table class="condition">
					<thead>
						<tr>
							<th style="width: 5%">Sl#</th>
							<th>Description</th>
						</tr>
					</thead>
					<tbody>
						<tr th:each="s, row : ${useCase.mainFlow.steps}">
							<td style="width: 5%" th:text="${row.count}">1</td>
							<td th:text="${s.description}"></td>
						</tr>

					</tbody>
				</table>

				<h2>Alternate Flows</h2>

				<div th:each="s, row : ${useCase.mainFlow.steps}">

					<div th:each="f, fowf: ${s.alternates}">



						<table class="condition">
							<thead>
								<tr>
									<th style="width: 5%">Sl#</th>
									<th>Description <span class="badge badge-warning pull-right"
							th:text="'Alternate Flow - ' + ${row.count} + '.' + ${fowf.count}"></span></th>
								</tr>
							</thead>
							<tbody>
								<tr th:each="r, rowr : ${f.steps}">
									<td style="width: 5%" th:text="${rowr.count}">1</td>
									<td th:text="${r.description}"></td>
								</tr>

							</tbody>
						</table>


					</div>

				</div>
				
				<h2>Exceptions</h2>
				
				<table class="condition">
					<thead>


						<tr>
							<th style="width: 5%">Sl#</th>

							<th>Description</th>

							

						</tr>
					</thead>
					<tbody>


						<tr th:each="s, row : ${useCase.exceptions}">
							<td style="width: 5%" th:text="${row.count}">1</td>
							<td th:text="${s}"></td>

						</tr>

					</tbody>
				</table>
				
				
				<h2>Includes</h2>
				
				<table class="condition">
					<thead>


						<tr>
							<th style="width: 5%">Sl#</th>

							<th>Use Case Name</th>

							

						</tr>
					</thead>
					<tbody>


						<tr th:each="s, row : ${useCase.includes}">
							<td style="width: 5%" th:text="${row.count}">1</td>
							<td th:text="${s.name}"></td>

						</tr>

					</tbody>
				</table>

				
				<h2>Special Requirements</h2>
				
				<table class="condition">
					<thead>


						<tr>
							<th style="width: 5%">Sl#</th>

							<th>Use Case Name</th>

							

						</tr>
					</thead>
					<tbody>


						<tr th:each="s, row : ${useCase.includes}">
							<td style="width: 5%" th:text="${row.count}">1</td>
							<td th:text="${s.name}"></td>

						</tr>

					</tbody>
				</table>
				
				<h2>Assumptions</h2>
				
				<table class="condition">
					<thead>


						<tr>
							<th style="width: 5%">Sl#</th>

							<th>Descriptions</th>

							

						</tr>
					</thead>
					<tbody>


						<tr th:each="s, row : ${useCase.assumptions}">
							<td style="width: 5%" th:text="${row.count}">1</td>
							<td th:text="${s}"></td>

						</tr>

					</tbody>
				</table>
				
				
			</div>

			<div class="span3">
				<div id="toc"></div>
				<!--/.well -->
			</div>



		</div>
		<!--/row-->

		<hr />





	</div>

	<div th:substituteby="fragments/userheader :: footer"></div>
	
	<!--/.fluid-container-->

	<!-- Le javascript
    ================================================== -->
	<!-- Placed at the end of the document so the pages load faster -->

	<script src="js/bootstrap-dropdown.js"
		th:src="@{/resources/js/bootstrap-dropdown.js}"></script>


	<script src="js/jquery.tablecloth.js"
		th:src="@{/resources/js/jquery.tablecloth.js}"></script>



	<script src="js/jquery-ui-1.9.1.custom.min.js"
		th:src="@{/resources/js/jquery-ui-1.9.1.custom.min.js}"></script>
	<script src="js/jquery.tocify.js"
		th:src="@{/resources/js/jquery.tocify.js}"></script>



	<script src="js/viewusecase.js"
		th:src="@{/resources/js/viewusecase.js}"></script>


</body>
</html>
